package com.ruoyi.merchant.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 商家财务流水实体
 */
@Data
@EqualsAndHashCode(callSuper = false)
//商家财务流水
public class FinancialFlow extends BaseEntity {
    
    private static final long serialVersionUID = 1L;
    
    //流水ID
    private Long flowId;
    
    //流水号
    private String flowNo;
    
    //商家ID
    private Long merchantId;
    
    //流水类型：1-收入，2-支出
    private Integer flowType;
    
    //业务类型
    private Integer businessType;
    
    //关联订单ID
    private Long relatedOrderId;
    
    //关联活动ID
    private Long relatedActivityId;
    
    //金额
    private BigDecimal amount;
    
    //变动前余额
    private BigDecimal balanceBefore;
    
    //变动后余额
    private BigDecimal balanceAfter;
    
    //平台佣金
    private BigDecimal commissionAmount;
    
    //实际到账金额
    private BigDecimal actualAmount;
    
    //支付方式
    private Integer paymentMethod;
    
    //提现银行卡ID
    private Long withdrawalCardId;
    
    //提现状态
    private Integer withdrawalStatus;
    
    //第三方交易流水号
    private String transactionId;
    
    //备注
    private String remark;
    
    //操作人类型
    private Integer operatorType;
    
    //操作人ID
    private Long operatorId;
    
    //操作人姓名
    private String operatorName;
    
    //审核状态
    private Integer reviewStatus;
    
    //审核人ID
    private Long reviewBy;
    
    //审核时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date reviewAt;
    
    //审核备注
    private String reviewRemark;
    
    //结算日期
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date settlementDate;
    
    //结算时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date settledAt;
    
    //创建时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createdAt;
    
    //更新时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updatedAt;
    
    //删除时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date deletedAt;
}
